<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>循环语句</title>
<script type="text/javascript">
var str="9";
for(i=0;i<4;i++){str="0"+str;}
document.write(str+" ");
var i=0;
var str="9";
while(i<4){str="0"+str;i++;}
document.write(str+" ");
var i=0;
var str="9";
do{
	str="0"+str;i++;
}while(i<4);
document.write(str);
</script>
</head>
<body>

</body>
</html>